#include <iostream>
#include <vector>

using std::cout;
using std::endl;
using std::vector;

int main()
{
    for(vector<int> v{1, 2, 3}; auto& e:v) //vector is a class template.When you declare a vector, \
    you must specify what type the vector's elements shall have: "a vector of what"?
    {
        cout << e << endl; 
    }
    return 0;
}

//warning: range-based ‘for’ loops with initializer only available with ‘-std=c++2a’ or ‘-std=gnu++2a’